package com.woniu.order.feign;

import com.woniu.common.utils.ResponseData;
import com.woniu.order.dto.ProductInfoDto;
import com.woniu.order.dto.ZsbProductDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "project-server")
public interface ZsbProductFeign {
    @GetMapping("/product/queryAllProduct")
    public ResponseData<?> queryAllProduct();

    @GetMapping("/product/reduceStock")
    public ResponseData<?> reduceStock(@RequestParam("productCode") String productCode,
                                       @RequestParam("reduceNum") Integer reduceNum);
    @GetMapping("/product/rollbackStock")
    public ResponseData<?> rollbackStock(@RequestParam("productCode") String productCode,
                                         @RequestParam("reduceNum") Integer reduceNum);
    @GetMapping("/product/queryAllProductList")
    public List<ProductInfoDto> queryAllProductList();
}
